package com.example;

/**
 * Hello world!
 *
 */
import com.example.service.ProductService;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
@Configuration
@ComponentScan
@EnableAspectJAutoProxy
public class App 
{
    public static void main(String[] args )
    {
        ApplicationContext ac = new AnnotationConfigApplicationContext(App.class);
        ProductService ps = ac.getBean(ProductService.class);
        ps.delete(1001);
        ps.add("商品1",100);
        String r=ps.findInfo(1000);
        System.out.println(r);
    }
}
